<?php

/**
 * @author aisyah
 * @copyright 2012
 */

require_once "../dao/user_dao.php";
require_once "../../app/dao/database.php";

$class_db = new Database;

$modul=$_GET['modul'];
$id=$_GET['id'];

switch($modul){
    
    case "hapus":
    
        $user = new User_Dao($class_db);
        
        $query = $user->db->delete('user','user_id ='.$id);
        
        if($query){
            header('location:user_view.php');
        }else{
            header('location:user_view.php?modul=detil&id='.$id);
        }
        
    
    break; 
    
    
    
    }